home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / msoftapp.zip / BOUNCE.H < prev    next >
C/C++ Source or Header  |  1993-06-01  |  1KB  |  42 lines

  1. // bounce.h : Declares the class interfaces for the Bounce child window.
  2.  
  3. #ifndef __BOUNCE_H__
  4. #define __BOUNCE_H__
  5.  
  6. class CBounceWin : public CMDIChildWnd
  7.     {
  8.         // bounce window client area and bouncing ball color/size parameters
  9.     short m_nColor, m_xPixel, m_yPixel, m_cxRadius, m_cyRadius;
  10.     short m_cxMove, m_cyMove, m_cxClient, m_cyClient, m_cxTotal, m_cyTotal;
  11.     short m_xCenter, m_yCenter;
  12.     short m_nSpeed;
  13.  
  14.         // for replicating bouncing ball
  15.     CBitmap* m_pBitmap;
  16.     COLORREF m_clrBall;
  17.     
  18.     CMenu* m_pMenuCurrent;
  19.     BOOL m_bWindowActive;
  20.  
  21. public:
  22.     CBounceWin();
  23.     BOOL Create(LPCSTR szTitle, DWORD style = (WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW),
  24.                 const RECT& rect = rectDefault,
  25.                 CMDIFrameWnd* pParent = NULL);
  26.     virtual ~CBounceWin();
  27.     void MakeNewBall();
  28.  
  29.     afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
  30.     afx_msg void OnDestroy();
  31.     afx_msg void OnSize(UINT nType, int cx, int cy);
  32.     afx_msg void OnTimer(UINT nIDEvent);
  33.     afx_msg void OnMDIActivate(BOOL bActivate,
  34.                        CWnd* pActivatedWnd, CWnd* pDeactivatedWnd);
  35.     afx_msg void OnColor();
  36.     afx_msg void OnSpeed();
  37.     DECLARE_MESSAGE_MAP()
  38.     };
  39.  
  40. #endif // __BOUNCE_H__
  41.  
  42.